﻿using System.Collections.ObjectModel;
using Eassets.Layered.Domain.Asset;
using Eassets.Data.Asset;

namespace Eassets.Service
{
    public class CompanyAssetService
    {

        private CompanyAssetData companyAssetsdata = new CompanyAssetData();

        public void AddCompanyAssets(CompanyAsset companyAssets)
        {
            if (companyAssets != null)
            {
                companyAssetsdata.AddCompanyAssets(companyAssets);
            }
        }

        public void ModifyCompanyAssets(CompanyAsset companyAssets)
        {
            if (companyAssets != null)
            {
                companyAssetsdata.ModifyCompanyAssets(companyAssets);
            }
        }

        public void DeleteCompanyAssets(long companyAssetsId)
        {
            if (companyAssetsId != 0)
            {
                companyAssetsdata.DeleteCompanyAssets(companyAssetsId);
            }
        }

        public CompanyAsset GetByIdCompanyAssets(long companyAssetsId)
        {
            return companyAssetsdata.GetByIdCompanyAssets(companyAssetsId);
        }

        public Collection<CompanyAsset> GetAllCompanyAssets()
        {
            return companyAssetsdata.GetAllCompanyAssets();
        }

        public void MapAssetToCompanyAsset(Collection<CompanyAsset> companyAssets)
        {
            CompanyAssetData companyAssetData = new CompanyAssetData();
            companyAssetData.MapAssetToCompanyAsset(companyAssets);
        }

        public Collection<CompanyAsset> GetMappedAssetByOrganizationLevelListId(int OrganizationLevelListId)
        {
            CompanyAssetData companyAssetData = new CompanyAssetData();
            return companyAssetData.GetMappedAssetByOrganizationLevelListId(OrganizationLevelListId);
        }

        public CompanyAsset GetCompanyAssetByAssetId(long assetId)
        {
            CompanyAsset companyAsset = new CompanyAsset();
            CompanyAssetData companyAssetData = new CompanyAssetData();
            return companyAssetData.GetCompanyAssetByAssetId(assetId);
        }
    }
}

